﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;


namespace rajitWorkTwo
{
    class tool
    {
        // CLASS VARIABLES

        public Texture2D sprite;
        public Vector2 position;
        public Vector2 center;

        public int pixelHeight = 0;
        public int pixelWidth = 0;

        public int realHeight = 0;
        public int realWidth = 0;

        /// <summary>
        /// Class constructor
        /// </summary>
        /// <param name="loadedTexture">2D Texture of the tool sprite</param>
        /// <param name="logPosition">Position of the sprite</param>
        public tool(Texture2D loadedTexture, Vector2 logPosition)
        {
            sprite = loadedTexture;
            center = new Vector2(sprite.Width / 2, sprite.Height / 2);
            position = logPosition;

            pixelHeight = gVar.toolPixelHeight;
            pixelWidth  = gVar.toolPixelWidth;

            realHeight = gVar.toolRealHeight;
            realWidth  = gVar.toolRealWidth;
        }

        // FUNCTION FOR MOVING LEFT
        public double moveLeft()
        {            
            position.X -= 1.0f;
            return position.X;
        }
        // FUNCTION FOR MOVING RIGHT
        public double moveRight()
        {
            position.X += 1.0f;
            return position.X;
        }
        // FUNCTION FOR MOVING UP
        public double moveUp()
        {
            position.Y -= 1.0f;
            return position.Y;
        }
        // FUNCTION FOR MOVING DOWN
        public double moveDown()
        {
            position.Y += 1.0f;
            return position.Y;
        }
    }
}
